[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                             FreeMem procedure

  DECLARATION:  FreeMem(var p : Pointer; Size : Word)

      PURPOSE:  Disposes a dynamic variable of a given size

         UNIT:  System

      REMARKS:  p must be a pointer variable of any type which has been
                previously assigned a value by GetMem or an assignment
                statement.  Size is a word-type expression specifying the
                size, in bytes, of the dynamic variable to be disposed of.
                This will destroy the variable reference by p and returns
                the memory previously used to the heap.  Subsequent to a call
                to FreeMem, the value of p becomes undefined and it
                will be an error should you attempt to reference the
                pointer p.

                NOTES:  The size, in bytes, must match exactly the number of
                        bytes previously allocated by GetMem.

                        If p does not reference a memory region in the
                        heap, a run-time error occurs.

See Also: Dispose GetMem Release
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson